//package xyz.xtt.exchange.vo;
//
//import java.math.BigDecimal;
//import java.util.Objects;
//
//import org.hibernate.validator.constraints.Length;
//
//import cn.hutool.core.util.IdUtil;
//import io.swagger.v3.oas.annotations.media.Schema;
//import jakarta.validation.constraints.Max;
//import jakarta.validation.constraints.Min;
//import jakarta.validation.constraints.NotBlank;
//import lombok.AllArgsConstructor;
//import lombok.Builder;
//import lombok.Builder.Default;
//import lombok.Data;
//import lombok.NoArgsConstructor;
//import xyz.xtt.common.objects.DozerUtil;
//import xyz.xtt.exchange.constants.AssetTypeEnum;
//import xyz.xtt.exchange.constants.FileTypeEnum;
//import xyz.xtt.exchange.constants.OwnerTypeEnum;
//import xyz.xtt.exchange.constants.PayUnitEnum;
//import xyz.xtt.exchange.constants.ReferProtocolEnum;
//import xyz.xtt.exchange.enums.ShowStateEnum;
//
//@AllArgsConstructor
//@NoArgsConstructor
//@Builder
//@Data
//public class MintRequestVo {
//	@NotBlank(message = "nft名称为必填项")
//	@Schema(description = "名称")
//	@Length(max = 30, message = "名称超过最大长度")
//	private String assetName;
//	@Schema(description = "NFT展示图")
//	@NotBlank(message = "NFT展示图为必填项")
//	private String displayUri;
//	@Min(value = 1, message = "数量下限为1")
//	@Max(value = 999, message = "数量上限为999")
//	@Schema(description = "数量")
//	private Integer amount;
//	@Default
//	private Boolean upChain = Boolean.FALSE;
//	@Schema(description = "描述")
//	@NotBlank(message = "描述为必填项")
//	@Length(max = 255, message = "描述超过最大长度")
//	private String description;
//	private String mintToken;
////	@Min(value = 0, message = "价格下限为0")
////	@Max(value = 99, message = "价格上限为999")
////	@Schema(description = "价格")
////	private BigDecimal price;
////	@Schema(description = "分类　竞猜EXCEPT头像PFPS元素ELEMENT权益INTEREST摄影PHOTO音乐MUSIC设计DESIGN")
////	@NotBlank(message = "分类为必填项")
////	private String type;
////	@Schema(description = "媒体类型0图片1视频")
////	@NotNull(message = "媒体类型0图片1视频")
////	private Integer mediaType;
////	@Schema(description = "风格id")
////	@NotNull(message = "风格id不能是空")
////	private Long cooperationId;
//
//	public TblAsset buildGroundAsset(String uid, long assetId, long pid, AssetTypeEnum tokenType, BigDecimal price) {
//		TblAsset asset = DozerUtil.transfor(this, TblAsset.class);
//		asset.setFirstType(tokenType.code());
//		asset.setId(assetId);
//		asset.setParentId(pid);
//		asset.setAssetNo(IdUtil.getSnowflakeNextId());
//		asset.setGuidePrice(price);
//		asset.setAuthorId(uid);
//		asset.setCooperationId(asset.getOwnerId());
//		asset.setPopularityRate(0L);
//		asset.setGoodsId(String.valueOf(assetId));
//		asset.setFirstType(tokenType.code());
//		asset.setShowState(ShowStateEnum.DOWN.code());
//		asset.setSecondType(tokenType.code());
//		asset.setCreateDatetime(System.currentTimeMillis());
//		asset.setLastModifyDatetime(System.currentTimeMillis());
//		asset.setSellPattern(1);
//		asset.setOwnerId(uid);
//		asset.setUnit(PayUnitEnum.CASH.code());
//		asset.setCollectionId(0L);
//		asset.setOwnerType(OwnerTypeEnum.USER.code());
//		return asset;
//	}
//
//	public TblAssetExt buildGroundAssetExt(Long assetId, Long tokenId, String chainId, ReferProtocolEnum tokenType) {
//		return TblAssetExt
//				.builder()
//				.assetId(assetId)
//				.id(IdUtil.getSnowflakeNextId())
//				.tokenId(tokenId)
//				.chainName(" ")
//				.chainId(String.valueOf(chainId))
//				.referProtocol(tokenType.getDescription())
//				.sellStartDatetime(0L)
//				.sellEndDatetime(0L)
//				.lastModifyDatetime(System.currentTimeMillis())
//				.upChain(0)
//				.showType(0)
//				.build();
//	}
//
//	public TblAssetStaticResource buildStaticResource(long assetId, FileTypeEnum fileType) {
//		return TblAssetStaticResource
//				.builder()
//				.id(IdUtil.getSnowflakeNextId())
//				.assetId(assetId)
//				.logoUri(displayUri)
//				.displayUri(displayUri)
//				.fileUri(displayUri)
//				.fileType(fileType.code())
//				.lastModifyTime(System.currentTimeMillis())
//				.build();
//	}
//
//	public String checkText() {
//		return String.format("%s$%s", assetName, description);
//	}
//
//	public Boolean checkUpChain() {
//		return Objects.nonNull(upChain) && Objects.equals(Boolean.TRUE, upChain);
//	}
//}
